unit headers;

interface

uses
  types,
  cls,
  enums,
  math,
  structs,
  xml;

type
// forward declared
  INotifier = class;
  IFileStream = class;
  IInputApi = class;
  IRenderableApi = class;
  IRenderBuffer = class;
  IDrawCustomApi = class;
  ICameraFactory = class;
  ICamera = class;
  IFileSystem = class;
  IMaterialFactory = class;
  IResourceFactory = class;
// IDBase         = class;
// ******************************************************************************
// std
// ******************************************************************************

// INotifier
  INotifier = class( CObject )
  protected { protected }
// INotifier::getInput
    function getInput : IInputApi; virtual; abstract;
// INotifier::getRender
    function getRenderer : IRenderableApi; virtual; abstract;
// INotifier::getDBase
// function getDBase: IDBase; virtual; abstract;
// INotifier::getFileSystem
    function getFileSystem : IFileSystem; virtual; abstract;
  public { public }
// INotifier::regOsCallHook
    procedure regOsCallHook( const inCall : funcObjOsHookMsg ); virtual; abstract;
// INotifier::writeLog
    procedure writeLog( const inMsgType : enumLogMsgType; const inMsg : pchar; const inFlagMode : enumOfLogMode ); virtual; abstract;
// INotifier::getPath
    function getPath : pchar; virtual; abstract;
// INotifier::input
    property input : IInputApi read getInput;
// INotifier::renderer
    property renderer : IRenderableApi read getRenderer;
// INotifier::sendNotifierMsg
    procedure sendNotifierMsg( const inMsg : pstructMsg ); virtual; abstract;
// INotifier::filesys
    property filesys : IFileSystem read getFileSystem;
// INotifier::dbase
// property dbase: IDBase read getDBase;
  end;

// IFileSystem
  IFileSystem = class( CObject )
  public
    function getFileHandle( const inName : pchar ) : handle; virtual; abstract;
    function getfile( const inHNDL : handle ) : IFileStream; virtual; abstract;
  end;

// IFileStream
  IFileStream = class
  public { public }
// IFileStream::read
    procedure read( const inBuffer : void; const inSize : uint ); virtual; abstract;
// IFileStream::write
    procedure write( const inBuffer : void; const inSize : uint ); virtual; abstract;
// IFileStream::close
    procedure close; virtual; abstract;
// IFileStream::getSize
    function getSize : int; virtual; abstract;
  end;
// ******************************************************************************
// input.dil
// ******************************************************************************

// IInputApi
  IInputApi = class( CObject )
  public { public }
// IInputApi::regCallBackKey
    procedure regCallBackKey( const inKey : vkKeys; const inCall : funcObjOutB ); virtual; abstract;
  end;

// ******************************************************************************
// render.dil
// ******************************************************************************
// IRenderableApi
  IRenderableApi = class( CObject )
  protected { protected }
// IRenderApi::getBuffer
    function getBuffer : IRenderBuffer; virtual; abstract;
// IRenderApi::getDrawApi
    function getDrawApi : IDrawCustomApi; virtual; abstract;
// IRenderApi::getWndHandle
    function getWndHandle : handle; virtual; abstract;
// IRenderApi::getFacotryCam
    function getFacotryCam : ICameraFactory; virtual; abstract;
  public { public }
// IRenderApi::buffer
    property buffer : IRenderBuffer read getBuffer;
// IRenderApi::drawApi
    property drawApi : IDrawCustomApi read getDrawApi;
// IRenderApi::wndHandle
    property wndHandle : handle read getWndHandle;
// IRenderApi::screenPos
    function screenPos : vec2i; virtual; abstract;
// IRenderApi::screenSize
    function screenSize : vec2i; virtual; abstract;
// IRenderApi::factoryCam
    property factoryCam : ICameraFactory read getFacotryCam;
// IRenderApi::reset
    procedure reset; virtual; abstract;
  end;

// IDrawCustomApi
  IDrawCustomApi = class( CObject )
  public { public }
// IDrawCustomApi::initRender
    function initRender( const inXml : CXML; const inRenderIntf : IRenderableApi ) : bool; virtual; abstract;
// IDrawCustomApi::freeRender
    procedure freeRender; virtual; abstract;
// IDrawCustomApi::writeInitStatus
    procedure writeInitStatus; virtual; abstract;
// IDrawCustomApi::drawCustom
    procedure drawCustom( const intype : enumDrawType; const inData : void ); virtual; abstract;
// IDrawCustomApi::setMatrix
    procedure setMatrix( const intype : enumCamMat; const inData : pmat4 ); virtual; abstract;
// IDrawCustomApi::unsetMatrix
    procedure unsetMatrix( const intype : enumCamMat; const inData : pmat4 ); virtual; abstract;
// IDrawCustomApi::setView
    procedure setView( const inW, inH : int ); virtual; abstract;
  end;

// IRenderBuffer
  IRenderBuffer = class( CObject )
  protected { protected }
    function getMatFactory : IMaterialFactory; virtual; abstract;
  public { public }
    property matlib : IMaterialFactory read getMatFactory;
  end;

// IDrawModel
  IDrawModel = class( CObject )
  public { public }
// function getMesh: pStructMesh; overr
  end;

// IApiGL1
  IApiGL1 = class( IDrawCustomApi )
  public { public }
  end;

// IApiGL2
  IApiGL2 = class( IDrawCustomApi )
  public { public }
  end;

// IApiGL3
  IApiGL3 = class( IDrawCustomApi )
  public { public }
  end;

// IAPID3D9
  IAPID3D9 = class( IDrawCustomApi )
  public { public }
  end;

// ICameraFactory
  ICameraFactory = class( CObject )
  protected { protected }
// ICameraFactory::getCurrCam
    function getCurrCam : ICamera; virtual; abstract;
// ICameraFactory::setCurrCam
    procedure setCurrCam( const inCam : ICamera ); virtual; abstract;
  public { public }
// ICameraFactory::currCam
    property cam : ICamera read getCurrCam write setCurrCam;
  end;

// CObject::ICamera
  ICamera = class( CObject )
  protected { std::protected }
// ICamera::getPos
    function getPos : vec3; virtual; abstract;
// ICamera::setPos
    procedure setPos( const inPos : vec3 ); virtual; abstract;
  public { std::public }
// ICamera::init
    procedure init( const inQuat : quat ); overload; virtual; abstract;
// ICamera::init
    procedure init( const inPos, inEuler : vec3 ); overload; virtual; abstract;
// ICamera::pos
    property pos : vec3 read getPos write setPos;
  end;

// IMaterialFactory
  IMaterialFactory = class( CObject )
  protected { protected }
  public { public }
  end;

  // IResourceFactory
  IResourceFactory = class( CObject )
  protected { protected }
  public { public }
  end;

implementation

end.
